package edu.flying.panda.taskmanager;

/**
 * Task class, contains variables to hold details of each Task
 * @author FlyingPanda
 */

public class Task {
	
	private int id;
	private int userId;
	private String description;
	private String location;
	private Date dueDate;
	private String detailedDescription;
	private String type;
	private boolean completed;
	private int longetude;
	private int latitude;
	
	
	public Task() {
		// empty constructor
	}
	
	
	/**
	 * Constructor method for a new Task
	 * @param ID id of the Task
	 * @param des Description of the Task (task name)
	 * @param loc Location of the Task
	 * @param due Time/Date of the Task
	 * @param det A detailed description/extra notes regarding the Task
	 * @param theType The Type/Category of the Task
	 * @param complete the boolean completion of the task
	 */
	
	public Task(int ID, int user, String des, String loc, Date due, String det, String theType, boolean complete) {
		id = ID;
		userId = user; 
		description = des;
		location = loc;
		dueDate = due;
		detailedDescription = det;
		type = theType;
		completed = complete;
	}
	
	public Task( int user,  String des, String loc, Date due, String det, String theType, boolean complete) {
		userId = user; 
		description = des;
		location = loc;
		dueDate = due;
		detailedDescription = det;
		type = theType;
		completed = complete;
	}
	


	
	/**
	 * Getter for Task name
	 * @return Returns the Task's name
	 */
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}

	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}

	public String getDescription() {
		return description;
	}


	/**
	 * Setter for the Task's description (name)
	 * @param description The Task name
	 */
	public void setDescription(String description) {
		this.description = description;
	}


	/**
	 * Getter for Task location
	 * @return Returns the location of the Task
	 */
	public String getLocation() {
		return location;
	}


	/**
	 * Setter for Task location
	 * @param location Location of the Task
	 */
	public void setLocation(String location) {
		this.location = location;
	}


	/**
	 * Getter for Task due date
	 * @return Returns the Task's due date
	 */
	public Date getDueDate() {
		return dueDate;
	}


	/**
	 * Setter for Task due date
	 * @param dueDate Due date of the Task
	 */
	public void setDueDate(Date dueDate) {
		this.dueDate = dueDate;
	}


	/**
	 * Getter for Task description
	 * @return Returns the Task's description
	 */
	public String getDetailedDescription() {
		return detailedDescription;
	}


	/**
	 * Setter for Task description
	 * @param detailedDescription A detailed description of the Task
	 */
	public void setDetailedDescription(String detailedDescription) {
		this.detailedDescription = detailedDescription;
	}


	/**
	 * Getter for Task Type
	 * @return Returns the type(category) of the Task
	 */
	public String getType() {
		return type;
	}

	
	/**
	 * Setter for Task type
	 * @param type Task type (category)
	 */
	public void setType(String type) {
		this.type = type;
	}

	
	/**
	 * Getter for Task completion
	 * @return Returns a boolean for Task completion
	 */
	public boolean isCompleted() {
		return completed;
	}

	
	/**
	 * Setter for Task completion
	 * @param completed Whether or not the task is complete
	 */
	public void setCompleted(boolean completed) {
		this.completed = completed;
	}


	/**
	 * Converts a Task object to a String
	 * @return Returns a String description of the Task
	 */
	@Override
	public String toString() {
		return description;
	}

}
